package com.link.base.base.expenseapplication.service;

import com.link.base.base.expenseapplication.model.ApplicationHead;
import com.link.base.base.expenseapplication.model.ApplicationHeadInfo;
import com.link.base.base.expenseapplication.model.ApplicationStoreDTO;
import com.link.core.basic.service.BasicService;

import java.util.List;
import java.util.Map;

/**
 * 费用申请头-费用申请头
 *
 * @author 黄正杨
 * @date 2019/04/16 19:06
 */
public interface ApplicationHeadService extends BasicService<ApplicationHead> {

    /**
     * 根据费用申请的ID计算他的金额汇总字段，
     * 生成key：费用申请的ID -value:只包含计算字段值的对象的MAP
     *
     * @author 朱泊阳
     * @date 2019/04/17
     * @param ids
     * @return Map
     * @throws Exception
     */
    Map<Long, ApplicationHead> computeMoneyMap(List<Long> ids) throws Exception;

    /**
     * 根据门店的申请头ID计算他的金额汇总字段，
     * 生成key：费用申请的ID -value:只包含计算字段值的对象的MAP
     *
     * @author 朱泊阳
     * @date 2019/04/17
     * @param ids
     * @return Map
     * @throws Exception
     */
    List<ApplicationStoreDTO> computeStroeMoneyMap(List<Long> ids) throws Exception;

    /**
     * 提交审批
     *
     * @param applicationHead
     * @param applicationHeadDetail
     * @throws Exception
     */
    public void submit(ApplicationHead applicationHead, String applicationHeadDetail) throws Exception;

    public void applicationObjectUpdate(ApplicationHeadInfo entity) throws Exception;

    /**
     * 审批通过后更新申请头信息及申请信息状态
     *
     * @throws Exception
     */
    public void applicationStatusUpdate(Long objectId, String param1, String param2, String param3, String param4, String param5) throws Exception;
}
